import request from '@/axios'

// 加入购物车接口
export const addCartListAPI = ({ skuId, count }) => {
  return request.post({ url: '/member/cart', data: { skuId, count } })
}

// 获取购物车接口
export const getCartListAPI = () => {
  return request.get({ url: '/member/cart' })
}

// 删除购物车
// ids: [String]
export const deleteCartListAPI = (ids) => {
  return request.delete({ url: '/member/cart', data: { ids } })
}

// 合并购物车
export const mergeCartAPI = (data) => {
  return request.post({ url: '/member/cart/merge', data })
}
